#!/usr/bin/env node

const http = require('http'),
      log  = console.log,
      url  = require('url');

let addr = 'http://sample.wangding.in/web/one-div.html',
    options = url.parse(global.encodeURI(addr));

http.get(addr, (res) => {
    log(`HTTP/${res.httpVersion} ${res.statusCode} ${res.statusMessage}`);
    log(res.headers);
    log('');
    res.pipe(process.stdout);
});

